import axios from '@/libs/api.request'

// 产品清单
export class FinanceProductApi {
  //  获取产品清单数据
  static getFinanceProductList (params) {
    return axios.request({
      url: '/FinanceProduct/GetFinanceProductList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 编辑时获取当前数据
  static getInfo (params) {
    return axios.request({
      url: '/FinanceProduct/GetInfo',
      method: 'get',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 新增编辑
  static postFinanceProduct (params) {
    return axios.request({
      url: '/FinanceProduct/PostFinanceProduct',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 删除
  static delete (params) {
    return axios.request({
      url: '/FinanceProduct/Delete',
      method: 'delete',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 启用禁用
  static enableFinanceProduct (params) {
    return axios.request({
      url: '/FinanceProduct/EnableFinanceProduct',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }
}
